function matTest
global GP;
tmpVar = load('result.mat');
GP.MAT.root= GenerateNodes(tmpVar);
tmpSize = size(GP.MAT.root);
GP.MAT.expand = tmpSize(2);

%MEMC_MATTypeWnd;

end

function [Nodes] = GenerateNodes(hireValue)
   NodesNames = fieldnames(hireValue);
   tmpSize = size(NodesNames);
   NodeNum = tmpSize(1);
   for k = 1:tmpSize(1)
      Nodes(k).name = NodesNames(k);
      %Nodes(k).nodes = 1;
      tmpValue = getfield(hireValue,char(NodesNames(k)));
      if isstruct(tmpValue)
          cldNodes = GenerateNodes(tmpValue);
          Nodes(k).child = cldNodes;
          %Nodes(k).nodes = Nodes(k).nodes + cldNodeNum;
          %NodeNum = NodeNum + cldNodeNum;
          Nodes(k).expand = 1;
          Nodes(k).slected = 0;
      else
          Nodes(k).child = [];
          Nodes(k).expand = 1;
          Nodes(k).slected = 0;
      end
   end
end
   
   